/**
 * 
 */
package com.novatialabs.qttt.gwt.client;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/**
 * Holds sample data for game or move notation.
 * 
 * @author nchalko
 */
public class NotationSample {
  private final Set<String> samples;
  private final String canonicleSample;

  public NotationSample(String canonicleGame, String... games) {
    this.canonicleSample = canonicleGame;
    HashSet<String> gameSet = new HashSet<String>(Arrays.asList(games));
    gameSet.add(canonicleGame);
    this.samples = Collections.unmodifiableSet(gameSet);
  }

  /**
   * The set of all game notation that are equivalent the the canonicleSample,
   * including the canonical
   */
  public Set<String> getSamples() {
    return samples;
  }

  public String getCanonicleSample() {
    return canonicleSample;
  }

  public String toString() {
    return canonicleSample + "=" + samples;
  }
}